package com.mt.common.system.entity;

import com.mt.common.core.annotation.DColumn;
import com.mt.common.core.annotation.DEntity;
import com.mt.common.core.web.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.quartz.JobDataMap;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;


//@DEntity(label = "定时任务", comment = "", moduleLabel = "定时任务")
//@Entity(name = "system_scheduled_task")
//@Table(name = "system_scheduled_task", indexes = {})
//@ApiModel(description = "定时任务:")
public class ScheduledTask extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    //@DColumn(index = 3, label = "任务名称", comment = "定时任务名称", component = "文本", where = false)
    //@ApiModelProperty(value = "任务名称:定时任务名称")
    //@Column(name = "job_name", length = 255, nullable = true, unique = false)
    private String jobName;

    //@DColumn(index = 4, label = "任务分组", comment = "定时任务分组", component = "文本", where = false)
    //@ApiModelProperty(value = "任务分组:定时任务分组")
    //@Column(name = "job_group", length = 255, nullable = false, unique = false)
    private String jobGroup;

    //@DColumn(index = 5, label = "cron表达式", comment = "cron表达式", component = "文本", where = false)
    //@ApiModelProperty(value = "cron表达式:cron表达式")
    //@Column(name = "cron", length = 255, nullable = true, unique = false)
    private String cron;

    //@DColumn(index = 6, label = "接口Bean", comment = "需要调用接口的beanName", component = "文本", where = false)
    //@ApiModelProperty(value = "接口Bean:需要调用接口的beanName")
    //@Column(name = "bean_name", length = 255, nullable = true, unique = false)
    private String beanName;

    //@DColumn(index = 7, label = "方法", comment = "需要调用的bean方法", component = "文本", where = false)
    //@ApiModelProperty(value = "方法:需要调用的bean方法")
    //@Column(name = "method_name", length = 255, nullable = true, unique = false)
    private String methodName;

    //@DColumn(index = 8, label = "方法参数", comment = "方法参数，json字符串存储", component = "文本", where = false)
    //@ApiModelProperty(value = "方法参数:方法参数，json字符串存储")
    //@Column(name = "method_params", length = 255, nullable = true, unique = false)
    private String methodParams;


    public String getJobName() {
        return this.jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getJobGroup() {
        return this.jobGroup;
    }

    public void setJobGroup(String jobGroup) {
        this.jobGroup = jobGroup;
    }

    public String getCron() {
        return this.cron;
    }

    public void setCron(String cron) {
        this.cron = cron;
    }

    public String getBeanName() {
        return this.beanName;
    }

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    public String getMethodName() {
        return this.methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getMethodParams() {
        return this.methodParams;
    }

    public void setMethodParams(String methodParams) {
        this.methodParams = methodParams;
    }

    //public JobDataMap getJobDataMap(){
    //    JobDataMap map=new JobDataMap();
    //    map.put("methodName",this.methodName);
    //    map.put("beanName",this.beanName);
    //    map.put("methodParams",this.methodParams);
    //    return map;
    //}

}
